﻿using Dict.DataModel;
using System.Collections;
using UnityEngine;
namespace Story
{
    class StepDialog : StepBase
    {
        bool isEasyTouchEnabled = false;
        bool isMaskShowed = false;
        protected override void OnStart()
        {
            isEasyTouchEnabled = EasyTouchTool.Instance.Enable;
            EasyTouchTool.Instance.Hide();

            isMaskShowed = UIAutoSize.Instance.isShow;
            UIAutoSize.Instance.ShowMaskUI(false);

            storyManager.dialogManager.Show(actionParam1, OnDialogEnd);
        }
        private void OnDialogEnd()
        {
            if (isEasyTouchEnabled)
                EasyTouchTool.Instance.ShowJoystick();

            UIAutoSize.Instance.ShowMaskUI(isMaskShowed);

            End();
        }
    }
}